package view;

import java.awt.Color;
import java.awt.event.ActionListener;

import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JTextField;
/**
 * this class is Graphic user interface of Human Resources Employee which extends AbstractGUI
 * @author Gili
 *
 */
public class HumanResourcesGui extends AbstractGUI{
	
	private JButton logOut = null;
	private JButton updateDetales = null;
	private JButton createNewEmployee = null;

	
	public HumanResourcesGui(){
		
		getContentPane().add(getCreateNewEmployee());
		getContentPane().add(getUpdateDetales());
		getContentPane().add(getLogOut());
		getContentPane().setBackground(Color.pink);
		getContentPane().setLayout(null);
		this.setTitle("              Ccrm/Human Resources");
		this.setBounds(500, 200, 400, 300);
		//this.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
		this.setVisible(true);
		this.setResizable(false);
	}

	public JButton getLogOut() {
		if(logOut == null){
			logOut = new JButton("logOut");
			logOut.setBounds(10, 20, 93, 29);
		}	
		return logOut;
	}
	
	public JButton getCreateNewEmployee() {
		if(createNewEmployee == null){
			createNewEmployee = new JButton("Create New Employee");  //new Employee
			createNewEmployee.setBounds(10, 73, 180, 35);
		}
		return createNewEmployee;
	}

	public JButton getUpdateDetales() {
		if(updateDetales == null){
			updateDetales = new JButton("Update Employee Detales");
			updateDetales.setBounds(10, 131, 180, 35);
		}
		return updateDetales;
	}
	
	////ActionListeners
	public void addLogoutActionListener(ActionListener listener){
		logOut.addActionListener(listener);
	}
	
	public void addcreateNewEmployeeActionListener(ActionListener listener){
		createNewEmployee.addActionListener(listener);
	}
	public void addUpdateDetalesActionListener(ActionListener listener){
		updateDetales.addActionListener(listener);
	}

}
